import request from '@/utils/request'

// 查询仓库列表
export function listStorehouse(query) {
  return request({
    url: '/supplier/storehouse/list',
    method: 'get',
    params: query
  })
}

// 查询仓库详细
export function getStorehouse(id) {
  return request({
    url: '/supplier/storehouse/' + id,
    method: 'get'
  })
}

// 新增仓库
export function addStorehouse(data) {
  return request({
    url: '/supplier/storehouse',
    method: 'post',
    data: data
  })
}

// 修改仓库
export function updateStorehouse(data) {
  return request({
    url: '/supplier/storehouse',
    method: 'put',
    data: data
  })
}

// 删除仓库
export function delStorehouse(id) {
  return request({
    url: '/supplier/storehouse/' + id,
    method: 'delete'
  })
}

// 导出仓库
export function exportStorehouse(query) {
  return request({
    url: '/supplier/storehouse/export',
    method: 'get',
    params: query
  })
}